{% load comments %}

{% if post.listed %}
  <div class="pub-date">Published on {{ post.pub_date|date:"l, F j, Y" }}</div>
{% else %}
  <div class="pub-date">Draft post</div>
{% endif %}

{% if post.content %}
  {{ post.render.fragment }}
{% else %}
  <p><em>Empty post</em></p>
{% endif %}

<div class="comments-link">
  {% get_free_comment_count for blog.Post post.id as comment_count %}
  <div class="by-line">Posted by {{ post.posted_by.get_full_name|escape }}</div>
  <span>&raquo;</span>
  <a href="{{ post.get_absolute_url|escape }}">Permanent Link /
    {{ comment_count }} Comment{{ comment_count|pluralize }}</a>
</div>

